#include <iostream>
#include <cstdio>
using namespace std;

int main(){
	int w;
	cin>>w;
	if(w<=10){
		printf("%.2f",w*0.8+0.2);
	}else if(w<=20){
		printf("%.2f",0.8*10+0.75*(w-10)+0.2);
	}else if(w<=30){
		printf("%.2f",0.8*10+0.75*10+0.7*(w-20)+0.2);
	}else{
		printf("Fail");
	}
	return 0;
}
